<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86137
  Date: 2021/8/1
  Time: 11:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>UserList</title>
</head>
<body>
            <table border="1">

                    <tr>
                        <th>id</th>
                        <th>name</th>
                        <th>gender</th>
                        <th>age</th>
                        <th>address</th>
                        <th>qq</th>
                        <th>email</th>
                        <th>operation</th>
                    </tr>
                <c:forEach items="${users}" var="u">
                    <tr>
                        <td>${u.id}</td>
                        <td>${u.name}</td>
                        <td>${u.gender}</td>
                        <td>${u.age}</td>
                        <td>${u.address}</td>
                        <td>${u.qq}</td>
                        <td>${u.email}</td>
                                                                <%--根据id进行删除--%>
                        <td><a href="${pageContext.request.contextPath}/userServlet?method=findById&upid=${u.id}">update</a>&nbsp;
                             <a href="${pageContext.request.contextPath}/userServlet?method=delete&delid=${u.id}">delete</a> </td>
                    </tr>

                </c:forEach>

            </table>

<a href="${pageContext.request.contextPath}/add.jsp">add</a>&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/index.jsp">index</a>


</body>
</html>
